#include "physics_object.h"

#include <iostream>
#include <cstdlib>

PhysicsObject::PhysicsObject() : pPosition(NULL), pMatWorld(NULL)
{

}

void PhysicsObject::SetPosition(float x, float y, float z)
{
    if(pPosition == NULL)
    {
        pPosition = new Vector3(x, y, z);
    }
    else
    {
        pPosition->Set(x, y, z);
    }
}

void PhysicsObject::SetPosition(Vector3 vNewPosition)
{
    SetPosition(vNewPosition.x, vNewPosition.y, vNewPosition.z);
}

void PhysicsObject::AddChild(PhysicsObject *pNew)
{
    Children.push_back(pNew);
}

Matrix4x4* PhysicsObject::GetWorldMatrixPointer()
{
    return pMatWorld;
}
